<template>
<div class="TopnavAndBanner">
    <Topnav />
    <div class="banner">
        <h1>Sporty-UI</h1>
        <h2>一款运动风格 UI 框架</h2>
        <h3>生命不息 运动不止</h3>
        <div class="actions">
            <a href="https://gitee.com/unknow1216" target="_blank">Gitee</a>
            <router-link to='/Doc'>快速上手</router-link>
        </div>
    </div>
</div>
<div class="features">
    <ul>
        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-code"></use>
            </svg>
            <h3>代码易读</h3>
            <p>每个组件的源代码都极其简洁</p>
        </li>
        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-vue"></use>
            </svg>
            <h3>基于 Vue 3</h3>
            <p>学习并且摸索地使用 Vue 3 Composition API</p>
        </li>
        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-typescript1"></use>
            </svg>
            <h3>基于 TypeScript </h3>
            <p>源代码采用 TypeScript 书写（非严格检查）</p>
        </li>
    </ul>
</div>
<Footer></Footer>
</template>

<script lang="ts">
import Topnav from '../components/Topnav.vue';
import Footer from '../components/footer.vue';
export default {
    components: {
        Topnav,
        Footer
    }
}
</script>

<style lang="scss" scoped>
$border-radius:4px;

.TopnavAndBanner {
    background: linear-gradient(234deg, rgba(182, 128, 249, 1) 0%, rgba(107, 48, 184, 1) 53%, rgba(79, 16, 162, 1) 100%);
    clip-path: ellipse(80% 60% at 50% 40%);
}

.features {
    //当定义好宽度容易受一些设备自身宽度影响导致布局中不平衡不对称的样式出现
    //可用百分比来替代宽度定值解决以上问题
    color: #5b5670;
    margin: 64px auto;
    //width: 400px;
    padding: 0 20px;

    @media(min-width: 800px) {
        width: 800px;

        >ul {
            >li {
                width: 50%;
            }
        }
    }

    @media(min-width: 1200px) {
        width: 1200px;

        >ul {
            >li {
                width: 33.3333%;
            }
        }
    }

    >ul {
        display: flex;
        flex-wrap: wrap;

        >li {
            //width: 400px;
            margin: 20px 0;
            display: grid;
            justify-content: start;
            align-content: space-between;
            grid-template-areas:
                "icon title"
                "icon text";
            grid-template-columns: 80px auto;
            grid-template-rows: 1fr auto;

            >svg {
                grid-area: icon;
                width: 64px;
                height: 64px;
            }

            >h3 {
                grid-area: title;
                font-size: 28px;
            }

            >p {
                grid-area: text
            }
        }
    }
}

.banner {
    padding: 100px 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    color: #ffffff;

    >h2 {
        padding: 20px 0 0;
    }

    >h3 {
        padding: 4px 0;
    }

    >.actions {
        color: #5b5670;
        padding: 20px 0;

        a {
            margin: 0 8px;
            background: #fff;
            display: inline-block;
            // $h: 28px;
            // height: $h;
            // line-height: $h;
            border-radius: $border-radius;
            padding: 8px 24px;

            &:hover {
                background: #ffebf6;
                color: #ff008a;
                text-decoration: none;
            }
        }
    }
}
</style>
